package cn.yr.common.exception.exception.base;


import cn.yr.common.exception.ret.Ret;
import cn.yr.common.exception.ret.RetCode;

/**
 * @author Lang 1102076808@qq.com
 * @description
 * @date 2020-06-22 22:14
 */
public abstract class BaseException extends RuntimeException {

	private Ret ret;

	public BaseException() {}

	public BaseException(RetCode retCode, String message) {
		super(retCode.getMessage());
		this.ret = Ret.error(retCode,message);
	}

	public  BaseException(Ret ret) {
		super(ret.getMessage());
		this.ret = ret;
	}

	public  Ret getRet() {
		return ret;
	}
}
